﻿@model ModuleModel
@@model @Model.View

<div class="col">
    <div class="widget-box readonly">
        <div class="widget-header">
            <span class="icon fa fa-th-list"></span>
            <h5>@@Headers.@Model.Model</h5>
            <div class="widget-header-buttons">
                <authorize action="Edit">
                    <a asp-action="Edit" asp-route-id="@@Model.Id" class="btn">
                        <span class="fa fa-pencil-alt"></span><span class="text">@@Actions.Edit</span>
                    </a>
                </authorize>
                <authorize action="Delete">
                    <a asp-action="Delete" asp-route-id="@@Model.Id" class="btn">
                        <span class="fa fa-times"></span><span class="text">@@Actions.Delete</span>
                    </a>
                </authorize>
            </div>
        </div>
        <div class="widget-content">
            @foreach (PropertyInfo property in Model.Properties)
            {
            <div class="form-group">
                <div class="control-label col-xs-12 col-md-3 col-lg-2">
                    <label for="@property.Name"></label>
                </div>
                <div class="control-content col-xs-12 col-md-9 col-lg-5">
                    @if (typeof(DateTime?).IsAssignableFrom(property.PropertyType))
                    {
                    <input asp-for="@property.Name" class="form-control" asp-format="{0:d}" autocomplete="off" />
                    }
                    else
                    {
                    <input asp-for="@property.Name" class="form-control" autocomplete="off" />
                    }
                </div>
            </div>
            }
        </div>
    </div>
</div>
